<?php
ob_start();
require_once('cls_page.php');
require_once('du_system.php');
$test = new Page();
$test->_page 		= isset($_GET['p'])?$_GET['p']:1;
$test->_pageUrl 	= ''; 
$test->_tableName 	= 'articles';
$test->SetSelectSql('SELECT date, title, text,id FROM articles ORDER BY id ');
$test->SetItem('时间!$!标题!$!内容');
$test->SetItemField('date!$!title!$!text');
$test->SetItemLink('!$!/#id#!$!');
$test->SetItemStyle("style='text-align:center;width:20%'!$!style='text-align:center;width:30%'!$!style='color:red;text-align:center;width:30%'");
$test->SetControlStr("<a href='index.php?id=#id#' #onclick#>修改</a> <a href='index.php?act=del&id=#id#'>删除</a>");
$test->SetItemType('1101!$!1101!$!1101');
$test->SetItemModify('n!$!y!$!y');
$test->SetModifyUrl('index.php?act=modify');
if($_GET['act']=='modify') {$test->DoModify();}
if($_GET['act']=='del') {$test->DoDel();}
#前
$test->SetPrefix('<li>');
$test->SetSuffix('</li>');
$test->SetLooofix('<cite>#0#</cite><a href="#">,#1#</a>, [#2#]');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<title>DUPHP</title>
</head>
<body>
<h2>DUPHP<span>beta 1.0</span></h2>
<div id="listmain">
	<h3>后台用</h3>
	<div class="list"><?php $test->ShowListAdmin(); ?></div>
	<h3>前台用</h3>
	<div class="list"><?php $test->ShowList('<ol>%s</ol>'); ?></div>
	<h3>添加</h3>
	<div><?php Input();?></div>
</div>
</body>
</html>
